package com.bella.springcloud.controller;/**
 * @program: cloud2022
 * @description:
 * @packagename: com.bella.springcloud.controller
 * @author: Bella白
 * @date: 2022-09-01 20:56
 **/

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author: bella白
 * @Title: OrderConsulController
 * @ProjectName: cloud2022
 * @Description:
 * @date: 2022/9/1 20:56
 */
@RestController
@Slf4j
public class OrderConsulController {
    public static final String INVOKE_URL="http://cloud-provider-payment";

    @Resource
    public RestTemplate restTemplate;
    @GetMapping(value = "/consumer/payment/consul")
    public String paymentInfo(){
        String result = restTemplate.getForObject(INVOKE_URL+"/payment/consul",String.class);
        return result;
    }
}
